﻿// HSS.Data.ModelGenerator.Tokens.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       Tokens.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Data.ModelGenerator
{
	#region Using Directives
	using System.ComponentModel;
	using System.Windows.Forms;
	#endregion

	#region Tokens
	/// <summary>
	/// Allows the user to view the tokens.
	/// </summary>	
	internal partial class Tokens : Form
	{
		#region Constructors
		/// <summary>
		/// Constructor
		/// </summary>
		public Tokens()
		{
			this.InitializeComponent();
			this.BindGrid();
		}
		#endregion

		#region Methods
		void BindGrid()
		{
			BindingList<Token> token = new BindingList<Token>();

			token.Add(new Token(Template.AUTHOR, "The name of the author/creator of the class to add to the remarks."));
			token.Add(new Token(Template.CTORBODY, "Contains the constructor body code."));
			token.Add(new Token(Template.CTORPARAMETERS, "Contains the constructor method parameters."));
			token.Add(new Token(Template.DATECREATED, "The date that the class was created to add to the remarks."));
			token.Add(new Token(Template.NAMESPACE, "The name of the namespace the class is a part of."));
			token.Add(new Token(Template.OBJECTNAME, "The name of the object from which the class will be constructed."));
			token.Add(new Token(Template.BASECLASS, "The base class for the entity."));
			token.Add(new Token(Template.PRIMARYKEY, "The primary key (if found)."));
			token.Add(new Token(Template.PROPERTIES, "The generated properties for the object model."));
			token.Add(new Token(Template.LOADER, "Contains the body of a Load method from an IDataRecord."));

			this.dgTokens.DataSource = token;
		}
		#endregion

		#region Event Handlers
		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}
		#endregion
	}
	#endregion
}